package Queue;

import java.util.LinkedList;
import java.util.Queue;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 姚东名
 * Date: 2024-09-04
 * Time: 11:32
 */
public class Test {
    public static void main(String[] args) {
        MyQueue queue = new MyQueue();

        queue.offer(10);
        queue.offer(21);
        /*queue.offer(32);
        queue.offer(43);
        queue.offer(54);

        System.out.println(queue.poll());
        System.out.println(queue.poll());*/
        System.out.println(queue.peek());
        System.out.println(queue.poll());
        System.out.println(queue.peek());
    }
    public static void main1(String[] args) {
        Queue<Integer> queue = new LinkedList<>();//
        queue.offer(10);
        queue.offer(21);
        queue.offer(32);
        queue.offer(43);
        queue.offer(54);

        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.peek());
    }
}
